//
//  LHViewController.m
//  PayDemo
//
//  Created by HanHan on 2017/8/1.
//  Copyright © 2017年 HanHan. All rights reserved.
//

#import "LHViewController.h"
#import "PayApi.h"
@interface LHViewController ()
@property (weak, nonatomic) IBOutlet UIButton *withDraw;
@property (weak, nonatomic) IBOutlet UITextView *withDrawResult;
@property (assign, nonatomic) NSInteger withDrawNum;

@end

@implementation LHViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    _withDrawNum = 1;
}
- (IBAction)withDrawAction:(id)sender {
    NSString *accountId = @"22";
    NSString *amount = @"20000.00";
    NSString *bankCardId = @"11";
    NSString *operName = @"哈哈哈";
    NSString *password = @"123456";
    [PayApi requestNet:accountId amount:amount bankCardId:bankCardId operName:operName password:password completionBlock:^(NSString *data, NSError *error) {
        NSString *str = [NSString stringWithFormat:@"%@%ld次",data,(long)_withDrawNum];
        _withDrawResult.text = str;
        _withDrawNum++;
    }];
     
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
